import { updateArticle, updateStatus, allocateCharacter, startUsers, shutUsers } from '@/api/userManagement'
/**
 * 修改用户信息
 */
export function userUpdateArticle(tempData) {
  return new Promise((resolve, reject) => {
    try {
      const res = updateArticle(tempData)
      resolve(res)
    } catch (error) {
      reject(error)
    }
  })
}

export function userUpdateStatus(tempData) {
  return new Promise((resolve, reject) => {
    try {
      const res = updateStatus(tempData)
      resolve(res)
    } catch (error) {
      reject(error)
    }
  })
}

export function userAllocateCharacter(tempData) {
  return new Promise((resolve, reject) => {
    try {
      const res = allocateCharacter(tempData)
      resolve(res)
    } catch (error) {
      reject(error)
    }
  })
}

export function startUsersInfo(tempData) {
  return new Promise((resolve, reject) => {
    try {
      const res = startUsers(tempData)
      resolve(res)
    } catch (error) {
      reject(error)
    }
  })
}

export function shutUsersInfo(tempData) {
  return new Promise((resolve, reject) => {
    try {
      const res = shutUsers(tempData)
      resolve(res)
    } catch (error) {
      reject(error)
    }
  })
}
